from django.contrib import admin
from djwheel.adminutils import AdvancedAdmin
import models

class NewsGroupAdmin(AdvancedAdmin):
#    def __call__(self, request, url):
#        ''' Overriden to route extra URLs.'''
#        return super(NewsGroupAdmin, self).__call__(request, url)

    model = models.NewsGroup
    list_display = (
        'name',
#        'lang',
        'description',
    )
    list_display_links = (
        'name',
    )

class NewsAdmin(AdvancedAdmin):
    model = models.News
    list_display = (
        'group',
        'date',
        'title',
        'adm_text',
        'always_on_top',
    )
    list_display_links = (
        'title',
    )
    visual_editor = (
        'text',
        'full_text',
    )
    list_per_page = 15
